import React from 'react';
import { createStackNavigator } from "react-navigation";
import { Image, Text, View } from 'react-native';
//Home
import Home from './routes/home';
//Xuge
import Xuge from './routes/xuge';
//Issue
import Issue from './routes/issue';
//Choose
import Choose from './routes/choose';
//Mine
import Mine from './routes/mine';
//公用搜索
import Texts from './components/Text/index';
import SearchItem from './components/Text/components/search-item';

export const HomeNavigator = createStackNavigator({
    Home: {
        screen: Home,
        navigationOptions: {
            headerTransparent: true
        }
    },
    Text:{
        screen: Texts,
    }
});

export const XugeNavigator = createStackNavigator({
    Xuge: {
        screen: Xuge,
        navigationOptions: {
            headerTransparent: true
        }
    },
    Text:{
        screen: Texts,
    },
    Search:{
        screen: SearchItem,
    }
});

export const IssueNavigator = createStackNavigator({
    Issue: {
        screen: Issue,
        navigationOptions: {
        }
    }
});

export const ChooseNavigator = createStackNavigator({
    Choose: {
        screen: Choose,
        navigationOptions: {
            headerTransparent: true
        }
    },
    Text:{
        screen: Texts,
    }
});

export const MineNavigator = createStackNavigator({
    Mine: {
        screen: Mine,
        navigationOptions: {
            // title:'我的页面'
            headerTitle: (
                <View style={{
                    display: 'flex',
                    flexDirection: 'row',
                    justifyContent: 'space-between',
                    alignItems: 'center',
                    paddingHorizontal:10
                }}>
                    <Text style={{ flex: 1, textAlign: 'center' }}>我的页面</Text>
                    <Image style={{width:16.25,height:16.8}} source={require('./routes/mine/assets/images/set-up.png')} />
                </View>
            ),
        }
    }
});